package com.zz.controller;

import com.zz.dto.PatientPhysiologistResult;
import com.zz.service.PhysiologyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Copyright Zz
 * FileName: PhysiologyController
 * Author:   Zz
 * Date:     2023/6/1021:52
 * Description:病人生理状态表Controller
 * hISTORY:
 * <author>  <time>     <version>    <desc>
 * 作者姓名   修改时间       版本号       描述
 */
@Controller
@RequestMapping("physiology")
public class PhysiologyController {

    @Autowired
    private PhysiologyService physiologyService;

    /**
     * 根据身份证号查询病人近几天生理状态信息(最多7天)
     * @param ID 身份证号
     * @return 指定身份证号病人近几天的生理状态信息
     */
    @ResponseBody
    @GetMapping("queryPhysiologyByID")
    public PatientPhysiologistResult queryPhysiologyByID(@RequestParam String ID){
        return physiologyService.queryPhysiologyByID(ID);
    }
}
